Skip to content

Added strict option for RedirectPlugin #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

olexiyk
Copy link
Contributor

@olexiyk olexiyk commented Jul 5, 2021

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets php-http/client-common#208
License MIT

What's in this PR?

Documenting strict option for RedirectPlugin

Strict RFC compliant redirects mean that POST redirect requests are sent as POST requests vs. doing what most browsers do which is redirect POST requests with GET requests.

Example Usage

$plugins = $plugins ?? [
    new RedirectPlugin(['strict' => true]),
];

$httpClient = (new PluginClientFactory())->createClient(
    Psr18ClientDiscovery::find(),
    $plugins
);

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot!

@dbu dbu merged commit 1a81e52 into php-http:master Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants